import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { JwtModule } from '@nestjs/jwt';
import { AuthConfig } from './auth.config';
import { AuthController } from './auth.controller';

@Module({
  imports: [
    JwtModule.register({
      secret: AuthConfig.jwtSecret,
      signOptions: { expiresIn: `${AuthConfig.expiresIn}s` },
    }),
  ],
  controllers: [AuthController],
  providers: [AuthService],
  exports: [AuthService, JwtModule],
})
export class AuthModule {}